<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>主界面 - DNF福利盒子</title>
    <script src="https://cdn.tailwindcss.com"></script>
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
    <style>
        body {
            font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
            background: #f2f2f7;
            margin: 0;
            padding: 0;
            height: 100vh;
            overflow: hidden;
        }
        .status-bar {
            height: 44px;
            background: rgba(0, 0, 0, 0.8);
            color: white;
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 0 20px;
            font-size: 14px;
            position: fixed;
            top: 0;
            left: 0;
            right: 0;
            z-index: 1000;
        }
        .nav-bar {
            height: 44px;
            background: white;
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 0 16px;
            border-bottom: 1px solid #e5e5ea;
            position: fixed;
            top: 44px;
            left: 0;
            right: 0;
            z-index: 1000;
        }
        .content {
            padding: 88px 16px 83px;
            height: calc(100vh - 127px);
            overflow-y: auto;
        }
        .tab-bar {
            height: 83px;
            background: rgba(255, 255, 255, 0.9);
            backdrop-filter: blur(20px);
            position: fixed;
            bottom: 0;
            left: 0;
            right: 0;
            display: flex;
            justify-content: space-around;
            align-items: center;
            border-top: 1px solid #e5e5ea;
            z-index: 1000;
        }
        .tab-item {
            display: flex;
            flex-direction: column;
            align-items: center;
            gap: 4px;
            color: #8e8e93;
            font-size: 10px;
        }
        .tab-item.active {
            color: #007aff;
        }
        .tab-item i {
            font-size: 22px;
        }
        .box-selector {
            background: #007aff;
            color: white;
            padding: 6px 12px;
            border-radius: 20px;
            font-size: 14px;
            font-weight: 500;
        }
        .activity-grid {
            display: grid;
            grid-template-columns: 1fr;
            gap: 16px;
            margin-bottom: 20px;
        }
        .activity-card {
            background: white;
            border-radius: 16px;
            overflow: hidden;
            box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
            position: relative;
            border: 2px solid transparent;
            transition: all 0.2s ease;
        }
        .activity-card.selected {
            border-color: #007aff;
            box-shadow: 0 8px 24px rgba(0, 122, 255, 0.3);
        }
        .activity-image {
            width: 100%;
            height: 180px;
            object-fit: cover;
        }
        .activity-overlay {
            position: absolute;
            bottom: 0;
            left: 0;
            right: 0;
            background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
            padding: 16px;
            color: white;
        }
        .activity-title {
            font-size: 18px;
            font-weight: 600;
            margin-bottom: 4px;
        }
        .activity-time {
            font-size: 12px;
            opacity: 0.9;
        }
        .checkbox {
            position: absolute;
            top: 12px;
            right: 12px;
            width: 24px;
            height: 24px;
            border: 2px solid #007aff;
            border-radius: 6px;
            background: white;
            display: flex;
            align-items: center;
            justify-content: center;
        }
        .checkbox.checked {
            background: #007aff;
        }
        .checkbox.checked::after {
            content: '✓';
            color: white;
            font-weight: bold;
        }
        .batch-toolbar {
            position: fixed;
            bottom: 83px;
            left: 0;
            right: 0;
            background: white;
            padding: 16px;
            border-top: 1px solid #e5e5ea;
            display: flex;
            justify-content: space-between;
            align-items: center;
            box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.1);
        }
        .btn-primary {
            background: #007aff;
            color: white;
            padding: 12px 24px;
            border-radius: 12px;
            font-weight: 600;
            border: none;
            cursor: pointer;
        }
        .btn-outline {
            background: transparent;
            color: #007aff;
            padding: 12px 24px;
            border-radius: 12px;
            font-weight: 600;
            border: 2px solid #007aff;
            cursor: pointer;
        }
    </style>
</head>
<body>
    <!-- 状态栏 -->
    <div class="status-bar">
        <span>12:34</span>
        <span>📶 5G</span>
    </div>

    <!-- 导航栏 -->
    <div class="nav-bar">
        <span>DNF福利盒子</span>
        <div class="box-selector">
            <i class="fas fa-cube"></i>
            <span>主号盒子</span>
            <i class="fas fa-chevron-down"></i>
        </div>
    </div>

    <!-- 内容区域 -->
    <div class="content">
        <div class="activity-grid">
            <!-- 黑色序章宿命回响 -->
            <div class="activity-card" onclick="toggleSelection(this)">
                <img src="https://game.gtimg.cn/images/dnf/cp/a20250807index/header.jpg" 
                     alt="黑色序章宿命回响" class="activity-image">
                <div class="activity-overlay">
                    <div class="activity-title">黑色序章宿命回响</div>
                    <div class="activity-time">2025-08-28 至 2025-09-25</div>
                </div>
                <div class="checkbox"></div>
            </div>

            <!-- 2025DNF井盖杯 -->
            <div class="activity-card" onclick="toggleSelection(this)">
                <img src="https://imagetest.hdnf.qq.com/a20250822manholecover/images/header_bg-DArlyEN2.png" 
                     alt="2025DNF井盖杯" class="activity-image">
                <div class="activity-overlay">
                    <div class="activity-title">2025DNF井盖杯</div>
                    <div class="activity-time">2025-08-11 至 2025-09-12</div>
                </div>
                <div class="checkbox"></div>
            </div>

            <!-- 更多活动示例 -->
            <div class="activity-card" onclick="toggleSelection(this)">
                <img src="https://game.gtimg.cn/images/dnf/cp/a20250701summer/header.jpg" 
                     alt="夏日狂欢节" class="activity-image">
                <div class="activity-overlay">
                    <div class="activity-title">夏日狂欢节</div>
                    <div class="activity-time">2025-07-01 至 2025-08-15</div>
                </div>
                <div class="checkbox"></div>
            </div>

            <div class="activity-card" onclick="toggleSelection(this)">
                <img src="https://game.gtimg.cn/images/dnf/cp/a20250601anniversary/header.jpg" 
                     alt="周年庆典" class="activity-image">
                <div class="activity-overlay">
                    <div class="activity-title">周年庆典</div>
                    <div class="activity-time">2025-06-01 至 2025-07-01</div>
                </div>
                <div class="checkbox"></div>
            </div>
        </div>
    </div>

    <!-- 批量操作工具栏 -->
    <div class="batch-toolbar" style="display: none;">
        <button class="btn-outline" onclick="clearSelection()">取消选择</button>
        <button class="btn-primary" onclick="claimSelected()">一键领取 (2)</button>
    </div>

    <!-- 底部标签栏 -->
    <div class="tab-bar">
        <div class="tab-item active">
            <i class="fas fa-gift"></i>
            <span>福利</span>
        </div>
        <div class="tab-item">
            <i class="fas fa-cubes"></i>
            <span>盒子</span>
        </div>
        <div class="tab-item">
            <i class="fas fa-bolt"></i>
            <span>批量</span>
        </div>
        <div class="tab-item">
            <i class="fas fa-cog"></i>
            <span>设置</span>
        </div>
    </div>

    <script>
        let selectedActivities = new Set();

        function toggleSelection(card) {
            card.classList.toggle('selected');
            const checkbox = card.querySelector('.checkbox');
            checkbox.classList.toggle('checked');
            
            if (card.classList.contains('selected')) {
                selectedActivities.add(card);
            } else {
                selectedActivities.delete(card);
            }
            
            updateBatchToolbar();
        }

        function updateBatchToolbar() {
            const toolbar = document.querySelector('.batch-toolbar');
            const claimBtn = toolbar.querySelector('.btn-primary');
            
            if (selectedActivities.size > 0) {
                toolbar.style.display = 'flex';
                claimBtn.textContent = `一键领取 (${selectedActivities.size})`;
            } else {
                toolbar.style.display = 'none';
            }
        }

        function clearSelection() {
            selectedActivities.forEach(card => {
                card.classList.remove('selected');
                card.querySelector('.checkbox').classList.remove('checked');
            });
            selectedActivities.clear();
            updateBatchToolbar();
        }

        function claimSelected() {
            alert(`开始领取 ${selectedActivities.size} 个活动的福利...`);
            // 这里会执行实际的领取逻辑
            clearSelection();
        }
    </script>
</body>
</html>